# -*- mode: python ; coding: utf-8 -*-

block_cipher = None

a = Analysis(
    ['start.py'],
    pathex=['.'],
    binaries=[],
    datas=[
        ('src/*.py', 'src'),
        ('requirements.txt', '.'),
        ('README.md', '.'),
    ],
    hiddenimports=[
        'tkinter',
        'tkinter.ttk',
        'tkinter.messagebox',
        'tkinter.scrolledtext',
        'tkinter.filedialog',
        'PIL',
        'PIL.Image',
        'PIL.ImageTk',
        'PIL.ImageDraw',
        'pandas',
        'openpyxl',
        'DrissionPage',
        'DrissionPage._base.chromium',
        'DrissionPage._configs.chromium_options',
        'DrissionPage._configs.session_options',
        'DrissionPage._pages.chromium_page',
        'DrissionPage._pages.session_page',
        'DrissionPage._pages.web_page',
        'DrissionPage.version',
        'DrissionPage.common',
        'DrissionPage.common.actions',
        'urllib',
        'urllib.request',
        'io',
        'hashlib',
        'threading',
        'sys',
        'os',
        'time',
        'csv',
        'logging',
        # 添加腾讯云API相关模块
        'urllib.parse',
        'urllib.error',
        'json',
        'hmac',
        'hashlib',
        # 腾讯云SDK相关模块
        'tencentcloud',
        'tencentcloud.common',
        'tencentcloud.common.credential',
        'tencentcloud.common.profile',
        'tencentcloud.common.profile.client_profile',
        'tencentcloud.common.profile.http_profile',
        'tencentcloud.common.exception',
        'tencentcloud.common.exception.tencent_cloud_sdk_exception',
        'tencentcloud.iai',
        'tencentcloud.iai.v20180301',
        'tencentcloud.iai.v20180301.iai_client',
        'tencentcloud.iai.v20180301.models'
    ],
    hookspath=[],
    hooksconfig={},
    runtime_hooks=[],
    excludes=[],
    win_no_prefer_redirects=False,
    win_private_assemblies=False,
    cipher=block_cipher,
    noarchive=False,
),

pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher)

exe = EXE(
    pyz,
    a.scripts,
    a.binaries,
    a.zipfiles,
    a.datas,
    [],
    name='tiktok_crawler',
    debug=False,
    bootloader_ignore_signals=False,
    strip=False,
    upx=True,
    upx_exclude=[],
    runtime_tmpdir=None,
    console=False,  # GUI应用设为False，不显示控制台窗口
    disable_windowed_traceback=False,
    target_arch=None,
    codesign_identity=None,
    entitlements_file=None
)